<template>
<div>
  <div>头部导航  <span @click="toPath" style="cursor: pointer">图标</span></div>
  <div>
    <classifiedPhone v-if="chooseModel==='phonePic'" :picType="picType"></classifiedPhone>
    <classifiedPc v-else :picType="picType"></classifiedPc>
  </div>
</div>
</template>

<script>
import classifiedPc from "@/components/classifiedPc";
import classifiedPhone from "@/components/classifiedPhone";
import {mapState,mapMutations} from 'vuex'
export default {
name: "findPage",
  data(){
  return {
    picType:'这里的type是根据头部菜单生成的',
  }
  },
  components:{
    classifiedPc,
    classifiedPhone
  },
  methods:{
    ...mapMutations(['toggle']),
    toPath(){
      var url=this.chooseModel
      if (url==='phonePic'){
        this.toggle('windowPic')
        return
      }else if(url==='windowPic'){
        this.toggle('phonePic')
        return
      }
    }
  },
  computed:{
    ...mapState(['chooseModel'])
  },
}
</script>

<style scoped>

</style>
